/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package edi.dao;

/**
 *
 * @author ge
 */

import java.util.List;

interface CrudDao<T> {
   
    public long count();
    public void delete(Long id);        
    public void delete(T entity);
    public void delete(Iterable<? extends T> iterable);
    public void deleteAll();
    public boolean exists(Long id);
    public List<T> findAll();
    public List<T> findAll(Iterable<Long> ids);
    public T findOne(Long id);
    public <S extends T> S save(S entity);
    public <S extends T> S saveOrUpdate(S entity);
    public <S extends T> List<S> saveOrUpdate(Iterable<S> entities);
    public <S extends T> List<S> save(Iterable<S> entities);
}
